package com.mm;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

@SpringBootApplication(
        //SpringBoot启动会自动注入数据源和配置jpa,这里排除掉
        exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class}
)
//将服务注册到注册管理中心
@EnableDiscoveryClient
@ServletComponentScan //使用该注解后,Servlet、Filter、Listener可直接通过@WebServlet、@WebFilter、@WebListener注解自动注册
public class MmSpringBoot2Application {
    public static void main(String[] args) {
        SpringApplication.run(MmSpringBoot2Application.class, args);
    }
}
